#!/usr/bin/env python
# coding=utf-8
import base64
from itertools import repeat

b64_str = input("Enter String: ").encode('utf-8')
encode_times = int(input("Enter the nummber of times to encode: "))

for i in repeat(None, encode_times):
    b64_str = base64.b64encode(b64_str)

print(b64_str)
